set(LLVM_LINK_COMPONENTS
  Support
)

add_llvm_tool(circt-opt
  circt-opt.cpp
)
llvm_update_compile_flags(circt-opt)
target_link_libraries(circt-opt
  PRIVATE
  CIRCTAffineToPipeline
  CIRCTAnalysisTestPasses
  CIRCTCalyx
  CIRCTCalyxToHW
  CIRCTCalyxToFSM
  CIRCTCalyxTransforms
  CIRCTESI
  CIRCTExportChiselInterface
  CIRCTExportVerilog
  CIRCTFIRRTL
  CIRCTFIRRTLToHW
  CIRCTFIRRTLTransforms
  CIRCTFSM
  CIRCTFSMTransforms
  CIRCTFSMToSV
  CIRCTHandshake
  CIRCTHandshakeToFIRRTL
  CIRCTHandshakeToHW
  CIRCTHandshakeTransforms
  CIRCTLLHD
  CIRCTLLHDToLLVM
  CIRCTHWToLLVM
  CIRCTCombToLLVM
  CIRCTLLHDTransforms
  CIRCTMoore
  CIRCTMooreToCore
  CIRCTMSFT
  CIRCTMSFTTransforms
  CIRCTHW
  CIRCTHWArith
  CIRCTHWArithToHW
  CIRCTInteropDialect
  CIRCTHWToLLHD
  CIRCTHWToSystemC
  CIRCTHWTransforms
  CIRCTSCFToCalyx
  CIRCTScheduling
  CIRCTSeq
  CIRCTSeqTransforms
  CIRCTSSP
  CIRCTSSPTransforms
  CIRCTStandardToHandshake
  CIRCTPipelineOps
  CIRCTPipelineToHW
  CIRCTPipelineTransforms
  CIRCTPipelineToCalyx
  CIRCTSV
  CIRCTSVTransforms
  CIRCTHWArith
  CIRCTSystemC
  CIRCTSystemCTransforms
  CIRCTTransforms

  MLIRIR
  MLIRLLVMDialect
  MLIRMemRefDialect
  MLIROptLib
  MLIRParser
  MLIRFuncDialect
  MLIRSupport
  MLIRTransforms
  MLIRSCFDialect
  MLIREmitCDialect
)
